package legumes.shared.domain;

public enum CivilityEnum {
	Sir("Mr."), 
	Madam("Mme."), 
	Miss("Mlle.");

	private String displayName;
	
	private CivilityEnum(String displayName_) {
		displayName = displayName_;
	}

	public String getDisplayName() {
		return displayName;
	}

	public static CivilityEnum fromDisplayName(String displayName_) {
		for (CivilityEnum r : values()) {
			if (r.getDisplayName().equals(displayName_)) {
				return r;
			}
		}
		return null;
	}

	public static String[] getDisplayNames() {
		String[] tab = new String[values().length];
		int i = 0;
		for (CivilityEnum r : values()) {
			tab[i++] = r.getDisplayName();
		}
		return tab;
	}

}
